package li.nibble.twittertido;

import java.util.ArrayList;

import li.nibble.twittertido.adapter.UserAdapter;
import li.nibble.twittertido.beans.User;
import li.nibble.twittertido.webservice.Client;
import android.app.ListActivity;
import android.os.Bundle;
import android.widget.TextView;

public class TopUsersTab extends ListActivity {

	ArrayList<User> users;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.top_users);
		users = Client.getTopUsers(this);

		TextView title = (TextView) findViewById(R.id.title);
		title.setText(getString(R.string.top_users));

		UserAdapter ta = new UserAdapter(this, R.layout.user_row, users);
		setListAdapter(ta);
	}

}
